import os

train_txt_path = os.path.join(".", "data", "faces.txt")
img_dir = os.path.join(".", "faces")
print(train_txt_path)


def genTXT(txt_path, img_dir):
    f = open(txt_path, 'w')

    for root, s_dirs, file in os.walk(img_dir):
        for i in file:
            img_path = os.path.join(root, i)
            label = 1
            line = img_path + " " + str(label) + '\n'
            f.write(line)
    f.close()


genTXT(train_txt_path, img_dir)
